﻿using Xiami.Helper.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using AMing.Helper.Net40;

namespace Xiami.Helper.Method
{
    public class GetListData
    {

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="xmlUrl"></param>
        /// <returns></returns>
        public TrackListInfo GetList(string xmlUrl)
        {
            try
            {
                HttpHelper httpHelper = new HttpHelper();
                XmlDocument xmlDoc = new XmlDocument();
                string xmldata = httpHelper.Get(xmlUrl);
                xmlDoc.LoadXml(xmldata);
                TrackListInfo trackListInfo = LoadXmlData.LoadData(xmlDoc);

                return trackListInfo;

            }
            catch (Exception)
            {
                return new TrackListInfo();
            }
        }
    }
}
